Optimal. Leaf size=70 \[ -\frac {c \tanh ^{-1}(\sin (e+f x))}{a^2 f}+\frac {7 c \tan (e+f x)}{3 a^2 f (\sec (e+f x)+1)}-\frac {2 c \tan (e+f x)}{3 f (a \sec (e+f x)+a)^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.16, antiderivative size = 70, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 32, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {4008, 3998, 3770, 3794} \[ -\frac {c \tanh ^{-1}(\sin (e+f x))}{a^2 f}+\frac {7 c \tan (e+f x)}{3 a^2 f (\sec (e+f x)+1)}-\frac {2 c \tan (e+f x)}{3 f (a \sec (e+f x)+a)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3770
Rule 3794
Rule 3998
Rule 4008
Rubi steps
\begin {align*} \int \frac {\sec ^2(e+f x) (c-c \sec (e+f x))}{(a+a \sec (e+f x))^2} \, dx &=-\frac {2 c \tan (e+f x)}{3 f (a+a \sec (e+f x))^2}-\frac {\int \frac {\sec (e+f x) (-4 a c+3 a c \sec (e+f x))}{a+a \sec (e+f x)} \, dx}{3 a^2}\\ &=-\frac {2 c \tan (e+f x)}{3 f (a+a \sec (e+f x))^2}-\frac {c \int \sec (e+f x) \, dx}{a^2}+\frac {(7 c) \int \frac {\sec (e+f x)}{a+a \sec (e+f x)} \, dx}{3 a}\\ &=-\frac {c \tanh ^{-1}(\sin (e+f x))}{a^2 f}-\frac {2 c \tan (e+f x)}{3 f (a+a \sec (e+f x))^2}+\frac {7 c \tan (e+f x)}{3 f \left (a^2+a^2 \sec (e+f x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.46, size = 335, normalized size = 4.79 \[ \frac {c \sec \left (\frac {e}{2}\right ) \cos \left (\frac {1}{2} (e+f x)\right ) \sec ^2(e+f x) \left (-6 \sin \left (e+\frac {f x}{2}\right )+10 \sin \left (e+\frac {3 f x}{2}\right )+3 \cos \left (e+\frac {3 f x}{2}\right ) \log \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )+3 \cos \left (2 e+\frac {3 f x}{2}\right ) \log \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )+9 \cos \left (\frac {f x}{2}\right ) \left (\log \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )-\log \left (\sin \left (\frac {1}{2} (e+f x)\right )+\cos \left (\frac {1}{2} (e+f x)\right )\right )\right )+9 \cos \left (e+\frac {f x}{2}\right ) \left (\log \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )-\log \left (\sin \left (\frac {1}{2} (e+f x)\right )+\cos \left (\frac {1}{2} (e+f x)\right )\right )\right )-3 \cos \left (e+\frac {3 f x}{2}\right ) \log \left (\sin \left (\frac {1}{2} (e+f x)\right )+\cos \left (\frac {1}{2} (e+f x)\right )\right )-3 \cos \left (2 e+\frac {3 f x}{2}\right ) \log \left (\sin \left (\frac {1}{2} (e+f x)\right )+\cos \left (\frac {1}{2} (e+f x)\right )\right )+24 \sin \left (\frac {f x}{2}\right )\right )}{6 a^2 f (\sec (e+f x)+1)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.47, size = 123, normalized size = 1.76 \[ -\frac {3 \, {\left (c \cos \left (f x + e\right )^{2} + 2 \, c \cos \left (f x + e\right ) + c\right )} \log \left (\sin \left (f x + e\right ) + 1\right ) - 3 \, {\left (c \cos \left (f x + e\right )^{2} + 2 \, c \cos \left (f x + e\right ) + c\right )} \log \left (-\sin \left (f x + e\right ) + 1\right ) - 2 \, {\left (5 \, c \cos \left (f x + e\right ) + 7 \, c\right )} \sin \left (f x + e\right )}{6 \, {\left (a^{2} f \cos \left (f x + e\right )^{2} + 2 \, a^{2} f \cos \left (f x + e\right ) + a^{2} f\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.71, size = 81, normalized size = 1.16 \[ \frac {c \left (\tan ^{3}\left (\frac {e}{2}+\frac {f x}{2}\right )\right )}{3 f \,a^{2}}+\frac {2 c \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{f \,a^{2}}+\frac {c \ln \left (\tan \left (\frac {e}{2}+\frac {f x}{2}\right )-1\right )}{f \,a^{2}}-\frac {c \ln \left (\tan \left (\frac {e}{2}+\frac {f x}{2}\right )+1\right )}{f \,a^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.61, size = 144, normalized size = 2.06 \[ \frac {c {\left (\frac {\frac {9 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {\sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}}{a^{2}} - \frac {6 \, \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}{a^{2}} + \frac {6 \, \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right )}{a^{2}}\right )} + \frac {c {\left (\frac {3 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {\sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}\right )}}{a^{2}}}{6 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.69, size = 44, normalized size = 0.63 \[ \frac {c\,\left (6\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )-6\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\right )}{3\,a^2\,f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ - \frac {c \left (\int \left (- \frac {\sec ^{2}{\left (e + f x \right )}}{\sec ^{2}{\left (e + f x \right )} + 2 \sec {\left (e + f x \right )} + 1}\right )\, dx + \int \frac {\sec ^{3}{\left (e + f x \right )}}{\sec ^{2}{\left (e + f x \right )} + 2 \sec {\left (e + f x \right )} + 1}\, dx\right )}{a^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________